<%include header%>
<h2>必须登陆后才可见</h2>
<form id="infoForm" method="post" class="form-horizontal" enctype="multipart/form-data">
  <h2>个人信息</h2>
  <hr/>
  <div class="form-group">
    <label for="name" class="control-label col-sm-2">姓名</label>
    <div class="col-sm-8">
      <input id="name" type="text" placeholder="真实姓名" name="name" value="<%=users.name%>" class="form-control" data-bv-notempty data-bv-notempty-message="不能为空" pattern="^[\u4e00-\u9fa5]{2,5}$" data-bv-regexp-message="请输入正确的姓名"/>
    </div>
  </div>
  <div class="form-group">
    <label for="name" class="control-label col-sm-2">头像</label>
    <div class="col-sm-8">
      <input id="headPicture" accept="image/*" onchange="previewImage(this,'headImage')" type="file" name="headPicture" class="form-control" />
    </div>
  </div>
  <div class="form-group">
   <label for="name" class="control-label col-sm-2">预览</label>
  <div class="col-sm-8">
		<image id="headImage" style="border:1px solid red;border-radius: 4px 4px 4px 4px" src="<%=users.headPicture%>" width="50px" height="50px" alt="zhao" onerror="this.src='/images/<%=users.random%>.jpg'"/>
		</div>
  </div>
  <div class="form-group">
    <div class="col-sm-10 col-sm-offset-2">
      <button type="submit" class="btn btn-primary">保存</button>
    </div>
  </div>
</form>
<script type="text/javascript">
  $(".layout-shouye").removeClass("active");
  $(".layout-mailer").removeClass("active");
  $(".layout-cheerio").removeClass("active");
  $(".layout-download").removeClass("active");
  $(".layout-info").addClass("active");
	$("#infoForm").bootstrapValidator();
</script>
<%include footer%>